package com.cass.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * spring doc配置
 * @author wangyou
 */
@Configuration
public class SpringDocConfig {
    @Bean
    public OpenAPI restfulOpenAPI() {
        return new OpenAPI()
                .info(new Info().title("学生信息管理系统")
                        .description("全面管理学生的信息、行为表现、学习成绩及综合素质评价")
                        .version("v0.0.1")
                        .license(new License().name("Apache 2.6").url("https://springdoc.org")))
                .externalDocs(new ExternalDocumentation()
                        .description("学生信息管理系统")
                        .url("https://gitee.com/forget-cares-and-worris/graduation-design"));
    }

}
